{extend name="public:base" /}
{block name="style"}
<link rel="stylesheet" type="text/css" href="__INDEX__/css/public.css">
<link rel="stylesheet" type="text/css" href="__INDEX__/css/style.css">
<link rel="stylesheet" type="text/css" href="__INDEX__/css/responsive.css">
<link rel="shortcut icon" href="__INDEX__/images/favorite.ico">
{/block}
{block name="html"}

<div class="pro_detail main">
    <div class="span6">
        <!--产品放大镜-->
        <div class="box">
            <div class="tb-booth tb-pic tb-s310">
                <a href="javascript:;"><img src="{$data.images}" alt="美女" rel="images/pro01.jpg" class="jqzoom" /></a>
            </div>

            <ul class="tb-thumb" id="thumblist">
                
            </ul>
        </div>
        
    </div>

    <div class="span6 instro">
        <p class="name">{$data.name}</p>
        <div class="price">
            <p class="pr">价格：<span>{$data.price}</span></p>
            <p class="ser">服务 <span>.不支持无理由退货</span> <span>.满88元包邮</span>
                <span>.部分地区无法配送</span>
            </p>
        </div>
        <form  id="orderForm" action='{:url("Order/order")}' method="post">
        <p class="num-p">数量：
            <a javascritp:; class="jian">-</a><input name="goods_num" class="num" value="1"><a href="javascript:;" class="jia">+</a>
            <input type="hidden" name="goods_id" value="{$data.id}">
        </p>
        <p class="btn">
            <a href="javascript:;"  onclick="submitOrderFuc()" class="to_buy">立即购买</a>
        </p>
        </form>
    </div>
    
</div>
<!--详情-->
<div id="pro_detail" class="main">
    <div class="span9 Tab">
        <ul class="ul">
            <li class="active">详情</li>
        </ul>
        <ul class="con">
            <li class="on">{$data.details}</li>
        </ul>
    </div>
    <div class="span3 relative">
        <p class="title">相关产品</p>
        <ul>
            <a href="pro_detail.html">
                <li>
                    <div>
                        <p class="name">碧螺春</p>
                        <img src="images/pro01.jpg" />
                        <p class="price">￥220</p>
                    </div>
                </li>
            </a>
            <a href="pro_detail.html">
                <li>
                    <div>
                        <p class="name">碧螺春</p>
                        <img src="images/pro01.jpg" />
                        <p class="price">￥220</p>
                    </div>
                </li>
            </a>
            <a href="pro_detail.html">
                <li>
                    <div>
                        <p class="name">碧螺春</p>
                        <img src="images/pro01.jpg" />
                        <p class="price">￥220</p>
                    </div>
                </li>
            </a>
        </ul>
    </div>
</div>


{/block}

{block name="javascript"}
<script src="__INDEX__/js/jquery-1.9.1.min.js"></script>
<script src="__INDEX__/js/public.js"></script>
<script src="__INDEX__/layer/layer.js"></script>
<script src="__INDEX__/js/jquery.imagezoom.min.js"></script>
<script>
    //加减
    $(".jia").click(function() {
        $(".num").val(parseInt($(".num").val()) + 1);
    })
    $(".jian").click(function() {
        if(parseInt($(".num").val()) <= 1) {
            $(".num").val(1)
            zdalert("消息", "不得小于0"); //弹出框("不得小于0")
        } else {
            $(".num").val(parseInt($(".num").val()) - 1);
        }
    })

    function submitOrderFuc() {

        $("#orderForm").submit();
    }
</script>

<script type="text/javascript">
    $(document).ready(function() {

        $(".jqzoom").imagezoom();

        $("#thumblist li a").click(function() {
            $(this).parents("li").addClass("tb-selected").siblings().removeClass("tb-selected");
            $(".jqzoom").attr('src', $(this).find("img").attr("src"));
            $(".jqzoom").attr('rel', $(this).find("img").attr("src"));
        });

    });
</script>

{/block}



